package com.bi.cloud;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;

//@SpringBootApplication
//@EnableDiscoveryClient
//@EntityScan("com.bi.cloud.pojo")
//@MapperScan("com.bi.cloud.dao")
public class EngineApplication {
    public static void main(String[] args) throws Exception {

        //SpringApplication.run(EngineApplication.class, args);
         System.out.println(new BCryptPasswordEncoder().encode("auth3366"));
        /*InputStream in = null;
        BufferedReader reader = null;
        StringBuilder sb = new StringBuilder();
        try {
            URL url = new URL("file:/E:/rsa/public.txt");
            URLConnection conn = url.openConnection();
            in = conn.getInputStream();
            reader = new BufferedReader(new InputStreamReader(in));
            String line;
            while ((line = reader.readLine()) != null) {
                sb.append(line);
            }
            System.out.println(sb.toString());
        } catch (Exception e) {
            throw new Exception("读取公钥失败");
        } finally {
            if (null != reader) {
                reader.close();
            }
            if (null != in) {
                in.close();
            }
        }*/

    }
}
